package com.summer.user.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;


@Entity
@Table(name = "official")
public class Official implements Serializable {
	
	private static final long serialVersionUID = 1L;
	private String id;
	private String department_name;
	private String position_name;
	private String department_code;
	private String post_code;
	private String subject_type;
	private String test_area;
	private Integer offer_count;
	private String recruit_target;
	private String education;
	private String degree;
	private String degree_allow;
	private String major;
	private String sex;
	private String political_face;
	private String min_service_year;
	private String work_experience;
	private String pe_test;
	private String department_level;
	private String department_nature;
	private String pe_standard;
	private String hotline;
	private String remark;
	private User uploader;
	private Date upload_time;
	
	private String test_year;
	@Id
	@Column(name = "id", nullable =  false, unique = true, length = 50)
	public String getId() {
		return this.id;
	}
	public void setId(String id) {
		this.id = id;
	}
	@Column(name = "department_name")
	public String getDepartment_name() {
		return this.department_name;
	}
	public void setDepartment_name(String department_name) {
		this.department_name = department_name;
	}
	@Column(name = "position_name")
	public String getPosition_name() {
		return this.position_name;
	}
	public void setPosition_name(String position_name) {
		this.position_name = position_name;
	}
	@Column(name = "department_code")
	public String getDepartment_code() {
		return this.department_code;
	}
	public void setDepartment_code(String department_code) {
		this.department_code = department_code;
	}
	@Column(name = "post_code")
	public String getPost_code() {
		return this.post_code;
	}
	public void setPost_code(String post_code) {
		this.post_code = post_code;
	}
	@Column(name = "subject_type")
	public String getSubject_type() {
		return this.subject_type;
	}
	public void setSubject_type(String subject_type) {
		this.subject_type = subject_type;
	}
	@Column(name = "test_area")
	public String getTest_area() {
		return this.test_area;
	}
	public void setTest_area(String test_area) {
		this.test_area = test_area;
	}
	@Column(name = "offer_count")
	public Integer getOffer_count() {
		return this.offer_count;
	}
	public void setOffer_count(Integer offer_count) {
		this.offer_count = offer_count;
	}
	@Column(name = "recruit_target")
	public String getRecruit_target() {
		return this.recruit_target;
	}
	public void setRecruit_target(String recruit_target) {
		this.recruit_target = recruit_target;
	}
	@Column(name = "education")
	public String getEducation() {
		return this.education;
	}
	public void setEducation(String education) {
		this.education = education;
	}
	@Column(name = "degree")
	public String getDegree() {
		return this.degree;
	}
	public void setDegree(String degree) {
		this.degree = degree;
	}
	@Column(name = "degree_allow")
	public String getDegree_allow() {
		return this.degree_allow;
	}
	public void setDegree_allow(String degree_allow) {
		this.degree_allow = degree_allow;
	}
	@Column(name = "major")
	public String getMajor() {
		return this.major;
	}
	public void setMajor(String major) {
		this.major = major;
	}
	@Column(name = "sex")
	public String getSex() {
		return this.sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	@Column(name = "political_face")
	public String getPolitical_face() {
		return this.political_face;
	}
	public void setPolitical_face(String political_face) {
		this.political_face = political_face;
	}
	@Column(name = "min_service_year")
	public String getMin_service_year() {
		return this.min_service_year;
	}
	public void setMin_service_year(String min_service_year) {
		this.min_service_year = min_service_year;
	}
	@Column(name = "work_experience")
	public String getWork_experience() {
		return this.work_experience;
	}
	public void setWork_experience(String work_experience) {
		this.work_experience = work_experience;
	}
	@Column(name = "pe_test")
	public String getPe_test() {
		return this.pe_test;
	}
	public void setPe_test(String pe_test) {
		this.pe_test = pe_test;
	}
	@Column(name = "department_level")
	public String getDepartment_level() {
		return this.department_level;
	}
	public void setDepartment_level(String department_level) {
		this.department_level = department_level;
	}
	@Column(name = "department_nature")
	public String getDepartment_nature() {
		return this.department_nature;
	}
	public void setDepartment_nature(String department_nature) {
		this.department_nature = department_nature;
	}
	@Column(name = "pe_standard")
	public String getPe_standard() {
		return this.pe_standard;
	}
	public void setPe_standard(String pe_standard) {
		this.pe_standard = pe_standard;
	}
	@Column(name = "hotline")
	public String getHotline() {
		return this.hotline;
	}
	public void setHotline(String hotline) {
		this.hotline = hotline;
	}
	@Column(name = "remark")
	public String getRemark() {
		return this.remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	@Column(name = "test_year")
	public String getTest_year() {
		return test_year;
	}
	public void setTest_year(String test_year) {
		this.test_year = test_year;
	}
	@ManyToOne
	@JoinColumn(name="uploader_id")
	public User getUploader() {
		return uploader;
	}
	public void setUploader(User uploader) {
		this.uploader = uploader;
	}
	@Column(name="upload_time")
	public Date getUpload_time() {
		return upload_time;
	}
	public void setUpload_time(Date upload_time) {
		this.upload_time = upload_time;
	}
	@Override
	public String toString() {
		return "Official [id=" + id + ", department_name=" + department_name + ", position_name=" + position_name
				+ ", department_code=" + department_code + ", post_code=" + post_code + ", subject_type=" + subject_type
				+ ", test_area=" + test_area + ", offer_count=" + offer_count + ", recruit_target=" + recruit_target
				+ ", education=" + education + ", degree=" + degree + ", degree_allow=" + degree_allow + ", major="
				+ major + ", sex=" + sex + ", political_face=" + political_face + ", min_service_year="
				+ min_service_year + ", work_experience=" + work_experience + ", pe_test=" + pe_test
				+ ", department_level=" + department_level + ", department_nature=" + department_nature
				+ ", pe_standard=" + pe_standard + ", hotline=" + hotline + ", remark=" + remark + ", uploader="
				+ uploader + ", upload_time=" + upload_time + ", test_year=" + test_year + "]";
	}
}